<%@ page import="com.mmy.domain.oa.LeaveInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/include1.jsp"></jsp:include>
<title>请假记录</title>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
				<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
					<main class="at-padding-large-bottom">
					<article>		
			<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
				<div class="page-header container">
					<h2>请假记录</h2>			
				</div>
			</header>
			<section class="container">
	

			<div>
				<a href="leaveinfo" >请假信息</a> |
				<a href="leavetype" >请假类型</a> 
				<hr style="FILTER: alpha(opacity=100,finishopacity=0,style=3); margin: 15px; " width=100%; color=#F9F6E5 SIZE=3></hr>
				<form id="form1" class="info-form" >
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>审核请假记录信息
						
						</h4>
				<div >
						<c:choose>
						     <c:when test="${leaveInfo.getFlag() == 3 && leaveInfo.getState() == 3}">
						          	 申请成功，无需审核
						     </c:when>
						     <c:when test="${leaveInfo.getFlag() == 2 && leaveInfo.getState() == 1}">
						           	 申请未通过，无法审核
						     </c:when>
						    
						</c:choose>
			
				<table class="info-table" >
				
						
				<tr>
					<th>请假类型</th>
					<td >
						<input type="hidden" name="LeaveID"  value="${leaveInfo.getLeaveID()}" >
						<input type="hidden" name="TypeID"  value="${leaveInfo.getTypeID()}" >
						<input type="text" name="TypeName" value="${strTypeName}" readonly/>
					</td>
					<th>请假理由</th>
					<td>
						<input type="text" name="Reason" value="${leaveInfo.getReason()}" readonly/>
					</td>
				</tr>	
				<tr>
					<th>审批意见</th>
					<td colspan="3" >
						<!--  <input type="hidden" name="MrgID" value="${sessionScope.tSysUser.getUserID()}"/><span class="mustWrite">*</span>-->
						<textarea name="Message" maxlength="500" >${leaveInfo.getMessage()}</textarea>
					</td>
				</tr>
				<tr>
					<th>备注</th>
					<td colspan="3">
						<textarea name="Memo" maxlength="256" >${leaveInfo.getMemo()}</textarea>
					</td>
				</tr>	
					
				</table>
				<center>
				<c:choose>
						     <c:when test="${leaveInfo.getFlag() == 3 && leaveInfo.getState() == 3}">
						          	<input type="button" class="btn" value="返回" onclick="rehidder()"/>
						     </c:when>
						     <c:when test="${leaveInfo.getFlag() == 2 && leaveInfo.getState() == 1}">
						            <input type="button" class="btn" value="返回" onclick="rehidder()"/>
						     </c:when>
						     <c:otherwise>
						    	<input type="button" class="btn" value="通过" onclick="passLeaveInfo()"/>
								<input type="button" class="btn" value="未通过" onclick="refuseLeaveInfo()"/>
								<input type="button" class="btn" value="返回" onclick="rehidder()"/>
						    </c:otherwise>
				</c:choose>
				
				</center> 
				</div>
				</form>
			</div>
			</section>
			</article>
			</main>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
		</div>
</body>
</html>